#!/bin/sh
set -e

case "$1" in
    purge)
        if [ -f /etc/iotedge/config.yaml ]; then
            rm /etc/iotedge/config.yaml
        fi
        if [ -d /var/lib/iotedge ]; then
            rm -rf /var/lib/iotedge
        fi
        if [ -d /var/log/iotedge ]; then
            rm -rf /var/log/iotedge
        fi
    ;;
    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac


#DEBHELPER#

exit 0
